#ifndef	_REFERENCE_SEQUENCE_H_
#define _REFERENCE_SEQUENCE_H_

#include "DynamicBitset.h"
#include "types.h"
#include <fstream>
#include "MinLengthSubs.h"


class ReferenceSequence
{
  private:
  	static const int CHAR_NUM = 4;
  	
  	static const int BUFFER_SIZE;
  	
	///DynamicBitset *bitsets[CHAR_NUM];
	size_t strLen;

	// The number of pairs blocks in the reference sequence
	size_t maxPairBlock;

	// An array of Sequence Blocks that holds the reference sequence as pairs of bits.
	// As in InputSequence, the pairs will be held in reverse order in each block (to save operations)
	SeqBlock* pairs;
	MinLengthSubs *subsHash;

  public:
	ReferenceSequence(ifstream &in, ulong maxSeqLength, size_t windowSize);

	~ReferenceSequence();
	
	size_t getLength() const { return strLen; }
	
/*
	int getBit(short c, size_t indx) const;
*/	

	char getChar(const size_t index) const;

	/* The returned reference is reversed */
	SeqBlock getBlock(const size_t fromIndex) const;

	const MinLengthSubs *getSubsHash() const;

#ifdef DEBUG
	void print() const;
#endif


};



#endif /* _REFERENCE_SEQUENCE_H_ */

